use lib qw(D:\Data\Perl\devel\TemplateEnginePrptotype\lib);

use Template5::DTD;
use Template5::Element;
use Template5::TreeBuilder;
use Template5::Creater;

use Data::Dump;

#------------------------------------------------------------------------------- 
my $treeBuilder = Template5::TreeBuilder->new();
my $hHTMLNode = $treeBuilder->parse_file(qw(D:\Data\Perl\devel\TemplateEnginePrptotype\data\testtemplate.html));

my $dtd     = Template5::DTD->new();
my $creater = Template5::Element->new();

my $creater = Template5::Creater->new($dtd, $creater);   
my $doc = $creater->create_element($hHTMLNode, {'iseditable' => 1, 'templatesdir' => qw(D:\Data\Perl\devel\TemplateEngine)});


#my @childs = $doc->listChild();
#
#foreach my $child (@childs)
#{
#	print $child->htmlnode()->as_HTML();
#	print "\n\n\n\n\n\n\n";
#};

#print $doc;
#print "\n";
#print $doc->clone();
#print "\n";

print $doc->getstruct()->as_HTML();
